@using SmartCode
@model BuildContext
@{
    Layout = "_JavaLayout.cshtml";
    var project = Model.Project;
    
    var appName = "Demo";

    if (project.Parameters.TryGetValue("ApplicationName", out var _appName))
    {
        appName = _appName.ToString();
    }
    var appClassName = $"{appName}Application";
}

package @(project.Module).server;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


@@SpringBootApplication
public class @appClassName {

public static void main(String[] args) {
    SpringApplication.run(@(appClassName).class, args);
}

}